<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://myfaces.apache.org/tomahawk" prefix="t"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
<%@ taglib uri="http://jakarta.apache.org/struts/tags-tiles"
	prefix="tiles"%>
<rich:panel header="#{messages['create.point.category']}">
	<h:panelGrid>
		<h:outputText value="#{errorBean.errorMessage}" styleClass="error"></h:outputText>
	</h:panelGrid>

	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:message for="code" styleClass="error"></t:message>
	
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="code" value="#{messages['code']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="code" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminPointCatBean.category.code}"></t:inputText>
		</h:panelGroup>
		
		<h:outputText></h:outputText>
		<t:message for="name" styleClass="error"></t:message>
		
		<h:panelGroup>
			<h:outputText value="*" styleClass="standardText_Mandatory" />
			<h:outputLabel for="name" value="#{messages['name']}" styleClass="standardText_Label" />
		</h:panelGroup>
		<h:panelGroup>
			<t:inputText id="name" required="true" size="50" maxlength="50" styleClass="standardText" value="#{adminPointCatBean.category.name}"></t:inputText>
		</h:panelGroup>
		
		
		<%--<h:outputText></h:outputText>
		<t:message for="effectivedate" styleClass="error"></t:message>
	
	    <h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="effectivedate" value="#{messages['effective.date']}" styleClass="standardText_Label" />
	    </h:panelGroup>
	    <h:panelGroup>
	    	<t:inputCalendar
	    	id="effectivedate"
				monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
				currentDayCellClass="currentDayCell" value="#{adminPointCatBean.term.effectivedate}"
				renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
				popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
				renderPopupButtonAsImage="true"
				styleClass="standardText" required="true">
	    	</t:inputCalendar>
	    </h:panelGroup>
	    
	    <h:outputText></h:outputText>
		<t:message for="expirydate" styleClass="error"></t:message>
	
	    <h:panelGroup>
	    	<h:outputText value="*" styleClass="standardText_Mandatory" />	
		    <h:outputLabel for="expirydate" value="#{messages['expiry.date']}" styleClass="standardText_Label" />
	    </h:panelGroup>
	    <h:panelGroup>
	    	<t:inputCalendar
	    	id="expirydate"
				monthYearRowClass="yearMonthHeader" weekRowClass="weekHeader" 
				currentDayCellClass="currentDayCell" value="#{adminPointCatBean.term.expirydate}"
				renderAsPopup="true" popupTodayString="#{messages['popup.today']}"
				popupWeekString="#{messages['popup.week']}" popupDateFormat="dd/MM/yyyy"
				renderPopupButtonAsImage="true"
				styleClass="standardText" required="true">
	    	</t:inputCalendar>
	    </h:panelGroup>--%>
		
	</t:panelGrid>
	
	<rich:spacer height="30"></rich:spacer>
	
	<t:panelGrid columns="2" columnClasses="standardTable_ColumnLeft_20,standardTable_ColumnLeft_80" width="100%">
		<h:outputText></h:outputText>
		<t:panelGrid columns="2">
			<h:commandButton value="#{messages['create']}" styleClass="button" action="#{adminPointCatBean.createAction}"></h:commandButton>
			<h:commandButton value="#{messages['cancel']}" styleClass="button" action="#{adminPointCatBean.navListAction}" immediate="true"></h:commandButton>
		</t:panelGrid>
	</t:panelGrid>
	
</rich:panel>